import request from '@/utils/request'

/** *
 * 获取权限列表
 * **/
export function getPermissionList() {
  return request({
    url: '/sys/permission'
  })
}
// 删除数据
export function delPermission(id) {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}
// 新增
export function addPermission(data) {
  return request({
    method: 'POST',
    url: `/sys/permission`,
    data
  })
}
// 编辑回显
export function echoPermission(id) {
  return request({
    url: `/sys/permission/${id}`
  })
}
// 编辑
export function editPermission(data) {
  return request({
    method: 'PUT',
    url: `/sys/permission/${data.id}`,
    data
  })
}
